import env from '../config/env';
import Sequelize from 'sequelize';

const database = new Sequelize(env('DB_DATABASE'), env('DB_USERNAME'), env('DB_PASSWORD'), {
    host: env('DB_HOST'),
    port: env('DB_PORT'),
    dialect: env('DB_CONNECTION'),
    pool: {
        max: 5,
        min: 0,
        acquire: 30000,
        idle: 10000
    },
    operatorsAliases: false
});

export default database;
